package cn.nnxy.purchaseshop.controller;

import cn.nnxy.purchaseshop.domain.CgGoods;
import cn.nnxy.purchaseshop.domain.OrderCar;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;

@Controller
public class OrderController {


    @GetMapping("order/index1")
    public String orderCar(){
        return "index1";
    }

//    private OrderCar session;
//    Integer sessionId = session.getUserId();

//    private HttpServletRequest request;

    public void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        HttpSession session=request.getSession();
        session.getAttribute("username");

    }
}
